Calling an external command in Python

by: douglassirkshaun, 8 years ago

Last edited: 8 years ago

How can I call an external command (as if I'd typed it at the Unix shell or Windows command prompt) from within a python script?   https://www.python.org/






You must be logged in to post. Please login or register an account.



We need to import subprocess and call subprocess.call()


subprocess.call(['ping', 'localhost'])


-Sharang 8 years ago

You must be logged in to post. Please login or register an account.